package com.region.http.client.model;

import com.region.common.adapter.json.JSONAdapterFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * @author liujieyu
 * @date 2023/6/10 17:16
 * @desciption
 */
public class RequestHeader {

    private Map<String, String> data = new HashMap<>(8);

    public RequestHeader() {
        super();
    }

    public void set(String key, String value) {
        this.data.put(key, value);
    }

    public Map<String, String> get() {
        return this.data;
    }

    public void remove(String key) {
        this.data.remove(key);
    }

    @Override
    public String toString() {
        return JSONAdapterFactory.getAdapter().toJSONString(this.data);
    }
}
